package io.binghe.concurrent.executor.state;

/**
 * WAITING状态,会释放获取到的锁对象
 */
public class WaitingState implements Runnable {
    @Override
    public void run() {
        while (true){
            synchronized (WaitingState.class){
                try {
                    WaitingState.class.wait();//首先要求就是需要获取到WaitingState.class类对象锁
//                    Thread.currentThread().wait();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
